export function getReqUrl(serverName) {
  let host = process.env.VUE_APP_HOST;
  let port = process.env.VUE_APP_PORT;
  let contextPath = process.env.VUE_APP_CONTEXT;

  if (serverName === 'auth') {
    host = process.env.VUE_APP_AUTH_HOST;
    port = process.env.VUE_APP_AUTH_PORT;
    contextPath = process.env.VUE_APP_AUTH_CONTEXT;
  } else if (serverName === 'file') {
    host = process.env.VUE_APP_FILE_HOST;
    port = process.env.VUE_APP_FILE_PORT;
    contextPath = process.env.VUE_APP_FILE_CONTEXT;
  }

  return `http://${host}:${port}${contextPath}`;
}
